<?php use_helper('I18N') ?>

<?php echo form_tag('structure/first', array('id' => 'frmlogin', 'name' => 'frmlogin')) ?>

<table width="950">
	<tr>
    	<td valign="top">
        	<table width="100%">
            	<tr>
                	<td align="left" class="welcome">WELCOME <?php echo $_SESSION['user_name']; ?></td>
                    <td width="16">&nbsp;</td>
                    <td width="164"></td>
                    <td width="70" align="right" valign="bottom"><img name="btnLogout" id="btnLogout" onmouseover="roll_over('btnLogout', '/images/logout_btnAF.jpg')" onmouseout="roll_over('btnLogout', '/images/logout_btn.jpg')" src="/images/logout_btn.jpg" border="0" onClick="location.href='/user/logout'" /></td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
    	<td align="right"><a href='/structure/firstedit?height=220&width=440' rel='sexylightbox'><img name="btnNew" id="btnNew" onmouseover="roll_over('btnNew', '/images/create_new_user_btnAF.jpg')" onmouseout="roll_over('btnNew', '/images/create_new_user_btn.jpg')" src="/images/create_new_user_btn.jpg" border="0" /></a></td>
    </tr>
    <tr>
    	<td><div id="pm_ex_list" name="pm_ex_list">
        	<table class="admin" width="100%" cellpadding="0" cellspacing="0">
            	<tr>
                	<td align="left" class="adminTitle" height="40">&nbsp;Structure 1</td>
                </tr>
                <?php
					echo '<tr><td class="adminTitle">';
					echo '<table width="100%"><tr>';
                    echo '<td width="400" align="left">Level 1</td>';
                    echo '<td width="335" align="left">Favorite Link</td>';
                    echo '<td width="200" align="left">Sequence</td>';
                    echo '<td width="66" align="left" valign="middle"></td>';
                    echo '<td width="66" align="left" valign="middle"></td>';
                    echo '</tr></table>';
                    echo '</td></tr>';
					
					$color = "#cfecdb";
					foreach ($tbl_structures as $tbl_structure){
						echo '<tr><td bgcolor="'.$color.'">';
						echo '<table width="100%"><tr>';
                        echo '<td width="400" align="left">'.$tbl_structure->getFName().'</td>';
                        echo '<td width="335" align="left">'.$tbl_structure->getFLink().'</td>';
                        echo '<td width="200" align="left">'.$tbl_structure->getFSeqNo().'</td>';
                        echo '<td width="66" align="left" valign="middle"><img src="/images/icon_edit.png" />&nbsp;<a href="/structure/firstedit?f_id='.$tbl_structure->getFId().'&height=220&width=440" rel="sexylightbox" class="login">edit</a></td>';
                        echo '<td width="66" align="left" valign="middle"><img src="/images/icon_close.png" />&nbsp;'.link_to('delete','structure/delete?f_structure=1&f_id='.$tbl_structure->getFId(), array('class'=>'login', 'post'=>'true', 'confirm'=>'Are you sure you want to delete?')).'</td>';
                      	echo '</tr></table>';
                       	echo '</td></tr>';
                            	
                      	if($color=="#cfecdb")
                      		$color="#ffffff";
                       	else
                       		$color = "#cfecdb";
					}
				?>
            </table>
            </div>
        </td>
    </tr>    
    <tr>
    	<td height="20" align="center"><img name="btnBack" id="btnBack" onmouseover="roll_over('btnBack', '/images/back_btnAF.jpg')" onmouseout="roll_over('btnBack', '/images/back_btn.jpg')" src="/images/back_btn.jpg" border="0" onClick="location.href='/user/main'" /></td>
    </tr>
</table>

</form>
